package com.duke.shaking.pojo;

import java.io.Serializable;
import java.util.Date;

public class Message implements Serializable {

	private static final long serialVersionUID = -4738135062266768480L;
	
	public  static final int MSG_DIRECTION_TO = 0;
	public  static final int MSG_DIRECTION_FROM = 1;
	
	public static final int SEND_STATE_NONE = 0;
	public static final int SEND_STATE_SENDING = 1;
	public static final int SEND_STATE_FAILED = 2;
	public static final int SEND_STATE_SUCCESS = 3;
	
	private Long    msgId; // the id in the local database
	private String  fromId;
	private String  toId;
	private Integer direction;
	private String  content;
	private Date    timestamp;
	private Date    recvTime;
	private Boolean unread;
	private Integer sendState;
	
	public Message() {
		timestamp = new Date();
	}
	
	public Date getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(Date timestampe) {
		this.timestamp = timestampe;
	}
	public Boolean isUnread() {
		return unread;
	}
	public void setUnread(Boolean unread) {
		this.unread = unread;
	}
	public String getFromId() {
		return fromId;
	}
	public void setFromId(String fromId) {
		this.fromId = fromId;
	}
	public String getToId() {
		return toId;
	}
	public void setToId(String toId) {
		this.toId = toId;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Integer getDirection() {
		return direction;
	}
	public void setDirection(Integer direction) {
		this.direction = direction;
	}

	public Long getMsgId() {
		return msgId;
	}

	public void setMsgId(Long msgId) {
		this.msgId = msgId;
	}

	public Date getRecvTime() {
		return recvTime;
	}

	public void setRecvTime(Date recvTime) {
		this.recvTime = recvTime;
	}

	public Integer getSendState() {
		return sendState;
	}

	public void setSendState(Integer sendState) {
		this.sendState = sendState;
	}
}
